package com.dongdong.android.demo.ui.login;

import com.dongdong.android.framework.http.requestentity.reqUserEntity;
import com.dongdong.android.framework.http.resultentity.BaseRsultEntity;
import com.dongdong.android.framework.http.resultentity.UserInfoEntity;
import com.dongdong.android.framework.mvp.BaseModel;
import com.dongdong.android.framework.mvp.BasePresenter;
import com.dongdong.android.framework.mvp.BaseView;

import io.reactivex.Observable;


/**
 * Created by dongdong on 2018/3/29.
 */

public interface LoginContract {

    /**
     * 业务实现模型
     */
    interface View extends BaseView {

        void onResultError(String error);

        void onLoginResult(BaseRsultEntity<UserInfoEntity> entity);

    }

    /**
     * 数据获取模型
     */
    interface Model extends BaseModel {

        Observable<BaseRsultEntity<UserInfoEntity>> login(reqUserEntity entity);

    }

    /***
     * 业务主持
     */
    abstract class Presenter extends BasePresenter<Model, View> {

        public abstract void login(reqUserEntity entity);

    }

}
